-- GENERATED SPELL FOR [King Krush] --


function spell0_32485(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(36140,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32485', 579, 1)
end

function spell1_32485(pUnit, Event) --@Mortal Wound,n/a--
pUnit:FullCastSpellOnTarget(48137,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32485', 20314, 1)
end

function spell2_32485(pUnit, Event) --@Terrifying Roar,Self--
pUnit:FullCastSpellOnTarget(36629,pUnit)
pUnit:RegisterEvent('Sorts_32485', 5320, 1)
end

function Sorts_32485(pUnit, Event)
local choix_sorts_32485 = math.random(0, 2)
if choix_sorts_32485 == 0 then
pUnit:RegisterEvent('spell0_32485', 1, 1)
end
if choix_sorts_32485 == 1 then
pUnit:RegisterEvent('spell1_32485', 1, 1)
end
if choix_sorts_32485 == 2 then
pUnit:RegisterEvent('spell2_32485', 1, 1)
end
end

function mob32485_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32485', math.random(1500, 3000), 1)
end

function mob32485_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32485_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32485_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32485, 1, 'mob32485_Action')
RegisterUnitEvent(32485, 2, 'mob32485_Leave')
RegisterUnitEvent(32485, 3, 'mob32485_Kill')
RegisterUnitEvent(32485, 4, 'mob32485_Die')
